# -*- coding: utf-8 -*-
"""
Created on Wed May 15 17:19:33 2019

@author: yaoyu
"""



def countfeq(s):
    for i in ',.':
        s=s.replace(i,'')
    txt= s.split()
    a = {}
    for i in txt:
        a[i] = a.get(i,0) + 1
    
    return a

if __name__ == "__main__":
   s = "Not clumsy person in this world, only lazy people, only people can not hold out until the last."
   s_dict = countfeq(s.lower())
   #word='not'
   word = input()
   print(s_dict.get(word, 0))